import redis
#建立连接池
pool = redis.ConnectionPool(host='192.168.209.200', port=6379, db=0)
r = redis.Redis(connection_pool=pool)

pipe = r.pipeline() # 创建一个管道
pipe.set('apple', 'red')
pipe.set('banana', 'yellow')
pipe. set ('cherry', 'pink')
pipe.execute()
print(r.mget('apple',"banana","cherry"))

r.close()
pool.close()